home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / rdslik1a / function.asp < prev    next >
Text File  |  1999-07-27  |  797b  |  18 lines

  1. <SCRIPT LANGUAGE="VBSCRIPT">
  2.     Sub AddToList(strDesc, strVal, objLst)
  3.         Dim objElement
  4.         Set objElement = document.createElement("OPTION")
  5.         ObjElement.text = strDesc
  6.         ObjElement.value = strVal
  7.         ObjElement.Selected = True
  8.         objLst.add(objElement)
  9.     End Sub
  10.     Sub LoadArray(InputDesc,TitleDesc,DefaultValue, TableName, IDField, DescField, cmbUpdate, AllowDup, ExtraFields)
  11.         Dim Answer
  12.         Answer = inputbox(InputDesc,TitleDesc,DefaultValue)
  13.         if Answer <> "" then
  14.             document.Frames("HiddenFrame").location="AsyncAddCMB.asp?NewValue=" & Answer & "&Table="& TableName &"&FieldID="& IDField &"&FieldDesc=" & DescField & "&cmbName=" & cmbUpdate & "&AllowDup=" & AllowDup & "&ExtraFields=" & ExtraFields
  15.         end if
  16.     End Sub
  17. </SCRIPT>
  18. <IFRAME ID="HiddenFrame" Style="display:none"></IFRAME>